<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-03-10 23:49:19
 * @LastEditTime: 2022-03-11 00:01:17
 * @LastEditors: CHINAKAIYUAN
 * @Description: 
 */
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-03-10 23:28:10
 * @LastEditTime: 2022-03-10 23:30:28
 * @LastEditors: CHINAKAIYUAN
 * @Description: 
 */

namespace App\Models;

class TableButton extends BaseModel
{
    //
    public $table = "basedata_table_button";
    protected $guarded = [];
    protected $casts =  [
        'isprint' => 'boolean',
    ];
    public function filters()
    {
        return "";
    }
    public function children()
    {
        return $this->hasMany(get_class($this), 'parent_id', 'id')->orderBy("sort", 'asc');
    }
    public function gridtable()
    {
        return $this->belongsTo(Table::class, "table_id");
    }
}
